From ee8e6110486415147a34586f050990c818f52a39 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 15 May 2008 14:19:14 +0000 Subject: [PATCH] Move endian detection back to runtime to benefit universal binaries on Mac. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3244 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 8ded3ea2a..41286af81 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -29,11 +29,17 @@ #include #include +// First test Apple's clever macro that's really a runtime test so +// that our universal binaries work right. +#if defined __BIG_ENDIAN__ +#define i_am_little_endian !__BIG_ENDIAN__ +#else #if defined WORDS_BIGENDIAN # define i_am_little_endian 0 #else # define i_am_little_endian 1 #endif +#endif #ifdef DEBUG_MEM #define DEBUG_FILENAME "/tmp/gpsbabel.debug" -- 2.30.2